package org.project.single.pojo.ro.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.stone.project.baseCommon.service.Insert;
import org.stone.project.baseCommon.service.Update;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Getter
@Setter
public class EditBackUserRo {
    @NotEmpty(message = "id不能为空",groups = Update.class)
    private String id;

    /**
     * 用户名
     */
    @NotEmpty(message = "username不能为空",groups = Insert.class)
    private String username;

    /**
     * 昵称
     */
    @NotEmpty(message = "nickname不能为空")
    private String nickname;

    /**
     * 密码
     */
    @NotEmpty(message = "password不能为空",groups = Insert.class)
    private String password;

    /**
     * 确认密码
     */
    @NotEmpty(message = "passwordConfirm不能为空",groups = Insert.class)
    private String passwordConfirm;

    /**
     * 头像
     */
    private String headImgUrl;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 性别
     * 1男 2女 3未知
     */
    private Integer sex;

    /**
     * 生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date borthDay;
}
